package com.wanxi;

import com.wanxi.model.StudentModel;
import com.wanxi.util.MyScanner;

import java.util.ArrayList;

public class ScannerStudent {
    public static void main(String[] args) {
        ArrayList<StudentModel> studentModelArrayList=new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            String name = new MyScanner().getString("请输入姓名:");
            String age = new MyScanner().getString("请输入年龄：");
            StudentModel model=new StudentModel(name,Integer.valueOf(age));
            studentModelArrayList.add(model);
        }
        System.out.println(studentModelArrayList);
    }
}
